# 函数
def eat():
    print("吃饭。。。")

def eat01(what1):
    print("我今天想吃"+what1)

def eat02(what1,what2):
    print("我今天想吃{}和{}".format(what1,what2))

def eat03():
    print("睡觉。。。。")
    res = "..."
    return res

def eat04(what1):
    print("我今天想吃" + what1)
    list01 = [1,2,3,'aaa','bbb']
    return list01

def eat05(what1):
    print("我今天想吃" + what1)
    return 1,2,3,'aaa','bbb'

def eat06(what1="包子",what2="豆浆"):
    print("我今天想吃{}和{}".format(what1,what2))

def eat07(what1,what2,*args):
    print("我今天想吃{}和{}".format(what1,what2))
    print(*args)
    print(args)

def add(x1,x2):
    return x1+x2
def sub(x1,x2):
    return x1-x2
def mul(x1,x2):
    return x1*x2
def div(x1,x2):
    if x2 == 0:
        print("被除数不能为0！！！")
        return "被除数不能为0！！！"
    else:
        return x1/x2

def func(x1,x2,str):
    if str == "+":
        res = add(x1, x2)
        return "执行了‘{}’运算：{} {} {} = {}".format(str,x1,str,x2,res)
    if str == "-":
        res = sub(x1, x2)
        return "执行了‘{}’运算：{} {} {} = {}".format(str,x1,str,x2,res)
    if str == "*":
        res = mul(x1, x2)
        return "执行了‘{}’运算：{} {} {} = {}".format(str,x1,str,x2,res)
    if str == "/":
        res = div(x1, x2)
        return "执行了‘{}’运算：{} {} {} = {}".format(str,x1,str,x2,res)

def func1():
    while True:
        x1 = int(input("请输入一个数："))
        if x1 == -1:
            break
        x2 = int(input("请输入一个数："))
        str = input("请输入一个运算符：")
        res = func(x1,x2,str)
        print(res)



if __name__ == '__main__':
    # 一系列代码
    print(".....")
    # eat()
    str1 = "苹果"
    # eat01(str1)
    str2 = "香蕉"
    # eat02(str1,str2)
    # eat02(str2,str1)
    # eat02(what2=str2,what1=str1)
    # eat06(str2,str1)
    # eat07(str2,str1,"牛奶","面包")
    # eat06(str2)
    # eat06()
    # eat03()
    # res01 = eat03()
    # print(res01)
    # list02 = eat04(str1)
    # print(list02)
    # tuple01= eat05(str1)
    # print(tuple01)
    func1()